package com.jxd.reportsys.controller;

import com.jxd.reportsys.model.Project;
import com.jxd.reportsys.service.IProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ProjectController
 * @Description TODO
 * @Author 朱隶文
 * @Date 2024/9/24 19:32
 * @Version 1.0
 */
@RestController
public class ProjectController {

    @Autowired
    private IProjectService projectService;

    @RequestMapping("/getProject")
    public List<Project> getProject(@RequestBody Map<String, Integer> map) {
        return projectService.getProjectByDeptno(map.get("deptno"));
    }
}
